const express = require('express')
const app = express()
const bodyParser = require('body-parser')
app.use(express.json())
app.use(require('cors')())
app.use(bodyParser.urlencoded({ extended: false }))
app.use(bodyParser.json())
app.use('/uploads', express.static(__dirname + '/uploads'))
require('./routes/admin')(app)
require('./plugins/db')(app)

app.set('key', 'test')// 生成token的时候，随便的一个加密数据

app.listen(3001, () => {
    console.log('http://localhost:3001')
})